﻿/*==============================================================*/
/* DBMS name:      Microsoft SQL Server 2005                    */
/* Created on:     2010-8-6 10:04:04                            */
/*==============================================================*/


if exists (select 1
            from  sysobjects
           where  id = object_id('dbo.Eaer_Accident')
            and   type = 'U')
   drop table dbo.Eaer_Accident
go

if exists (select 1
            from  sysobjects
           where  id = object_id('dbo.Eaer_AccidentExperts')
            and   type = 'U')
   drop table dbo.Eaer_AccidentExperts
go

if exists (select 1
            from  sysobjects
           where  id = object_id('dbo.Eaer_AccidentMaterial')
            and   type = 'U')
   drop table dbo.Eaer_AccidentMaterial
go

if exists (select 1
            from  sysobjects
           where  id = object_id('dbo.Eaer_AccidentMedias')
            and   type = 'U')
   drop table dbo.Eaer_AccidentMedias
go

if exists (select 1
            from  sysobjects
           where  id = object_id('dbo.Eaer_AccidentPictures')
            and   type = 'U')
   drop table dbo.Eaer_AccidentPictures
go

if exists (select 1
            from  sysobjects
           where  id = object_id('dbo.Eaer_AccidentSolution')
            and   type = 'U')
   drop table dbo.Eaer_AccidentSolution
go

if exists (select 1
            from  sysobjects
           where  id = object_id('Eaer_CaseLibrary')
            and   type = 'U')
   drop table Eaer_CaseLibrary
go

if exists (select 1
            from  sysobjects
           where  id = object_id('dbo.Eaer_EmergencyDept')
            and   type = 'U')
   drop table dbo.Eaer_EmergencyDept
go

if exists (select 1
            from  sysobjects
           where  id = object_id('Eaer_Experts')
            and   type = 'U')
   drop table Eaer_Experts
go

if exists (select 1
            from  sysobjects
           where  id = object_id('Eaer_Item')
            and   type = 'U')
   drop table Eaer_Item
go

if exists (select 1
            from  sysobjects
           where  id = object_id('Eaer_Knowledge')
            and   type = 'U')
   drop table Eaer_Knowledge
go

if exists (select 1
            from  sysobjects
           where  id = object_id('Eaer_Materials')
            and   type = 'U')
   drop table Eaer_Materials
go

if exists (select 1
            from  sysobjects
           where  id = object_id('dbo.Eaer_Plan')
            and   type = 'U')
   drop table dbo.Eaer_Plan
go

if exists (select 1
            from  sysobjects
           where  id = object_id('Eaer_RescueTeam')
            and   type = 'U')
   drop table Eaer_RescueTeam
go

if exists (select 1
            from  sysobjects
           where  id = object_id('Eaer_Suggestion')
            and   type = 'U')
   drop table Eaer_Suggestion
go

if exists (select 1
            from  sysobjects
           where  id = object_id('Eaer_Suppliers')
            and   type = 'U')
   drop table Eaer_Suppliers
go

if exists (select 1
            from  sysobjects
           where  id = object_id('Eaer_TrafficHealth')
            and   type = 'U')
   drop table Eaer_TrafficHealth
go

-- execute sp_revokedbaccess dbo
-- go

/*==============================================================*/
/* User: dbo                                                    */
/*==============================================================*/
-- execute sp_grantdbaccess dbo
-- go

/*==============================================================*/
/* Table: Eaer_Accident                                         */
/*==============================================================*/
create table dbo.Eaer_Accident (
   AccidentID           Int                  not null,
   AccidentName         Varchar(100)         null,
   AccidentType         Varchar(10)          null,
   AccidentLevel        Varchar(6)           null,
   Department           Varchar(20)          null,
   OccurrenceTime       Datetime             null,
   TerminalTime         Datetime             null,
   Scene                Varchar(100)         null,
   EnterpriseID         Varchar(20)          null,
   EnterpriseName       Varchar(50)          null,
   LocationID           Varchar(20)          null,
   Casualties           Varchar(200)         null,
   PecuniaryLoss        Varchar(200)         null,
   LinkMan              Varchar(20)          null,
   Telphone             Varchar(20)          null,
   Summary              Text                 null,
   Reason               Text                 null,
   Process              Text                 null,
   Longitude            Numeric(8,4)         null,
   Latitude             Numeric(8,4)         null,
   Weather              Varchar(50)          null,
   Harm                 varchar(100)         null,
   IsOver               bit                  null,
   SceneOpinion         text                 null,
   CenterOpinion        text                 null,
   DepartmentOpinion    text                 null,
   SuperiorOpinion      text                 null,
   Vidio                varchar(100)         null,
   Scheme               text                 null,
   constraint PK_EAER_ACCIDENT primary key (AccidentID)
)
go

execute sp_addextendedproperty 'MS_Description', 
   '事故属性',
   'user', 'dbo', 'table', 'Eaer_Accident'
go

execute sp_addextendedproperty 'MS_Description', 
   '事故编号',
   'user', 'dbo', 'table', 'Eaer_Accident', 'column', 'AccidentID'
go

execute sp_addextendedproperty 'MS_Description', 
   '事故名称',
   'user', 'dbo', 'table', 'Eaer_Accident', 'column', 'AccidentName'
go

execute sp_addextendedproperty 'MS_Description', 
   '事故类别',
   'user', 'dbo', 'table', 'Eaer_Accident', 'column', 'AccidentType'
go

execute sp_addextendedproperty 'MS_Description', 
   '事故响应等级',
   'user', 'dbo', 'table', 'Eaer_Accident', 'column', 'AccidentLevel'
go

execute sp_addextendedproperty 'MS_Description', 
   '主管部门',
   'user', 'dbo', 'table', 'Eaer_Accident', 'column', 'Department'
go

execute sp_addextendedproperty 'MS_Description', 
   '事故发生时间',
   'user', 'dbo', 'table', 'Eaer_Accident', 'column', 'OccurrenceTime'
go

execute sp_addextendedproperty 'MS_Description', 
   '事故结束时间',
   'user', 'dbo', 'table', 'Eaer_Accident', 'column', 'TerminalTime'
go

execute sp_addextendedproperty 'MS_Description', 
   '事故发生地点',
   'user', 'dbo', 'table', 'Eaer_Accident', 'column', 'Scene'
go

execute sp_addextendedproperty 'MS_Description', 
   '事故企业编码',
   'user', 'dbo', 'table', 'Eaer_Accident', 'column', 'EnterpriseID'
go

execute sp_addextendedproperty 'MS_Description', 
   '事故企业名称',
   'user', 'dbo', 'table', 'Eaer_Accident', 'column', 'EnterpriseName'
go

execute sp_addextendedproperty 'MS_Description', 
   '事故发生地区',
   'user', 'dbo', 'table', 'Eaer_Accident', 'column', 'LocationID'
go

execute sp_addextendedproperty 'MS_Description', 
   '事故伤亡情况',
   'user', 'dbo', 'table', 'Eaer_Accident', 'column', 'Casualties'
go

execute sp_addextendedproperty 'MS_Description', 
   '直接经济损失',
   'user', 'dbo', 'table', 'Eaer_Accident', 'column', 'PecuniaryLoss'
go

execute sp_addextendedproperty 'MS_Description', 
   '联系人',
   'user', 'dbo', 'table', 'Eaer_Accident', 'column', 'LinkMan'
go

execute sp_addextendedproperty 'MS_Description', 
   '联系电话',
   'user', 'dbo', 'table', 'Eaer_Accident', 'column', 'Telphone'
go

execute sp_addextendedproperty 'MS_Description', 
   '事故概况',
   'user', 'dbo', 'table', 'Eaer_Accident', 'column', 'Summary'
go

execute sp_addextendedproperty 'MS_Description', 
   '发生原因',
   'user', 'dbo', 'table', 'Eaer_Accident', 'column', 'Reason'
go

execute sp_addextendedproperty 'MS_Description', 
   '处理过程',
   'user', 'dbo', 'table', 'Eaer_Accident', 'column', 'Process'
go

execute sp_addextendedproperty 'MS_Description', 
   '经度',
   'user', 'dbo', 'table', 'Eaer_Accident', 'column', 'Longitude'
go

execute sp_addextendedproperty 'MS_Description', 
   '纬度',
   'user', 'dbo', 'table', 'Eaer_Accident', 'column', 'Latitude'
go

execute sp_addextendedproperty 'MS_Description', 
   '天气状况',
   'user', 'dbo', 'table', 'Eaer_Accident', 'column', 'Weather'
go

execute sp_addextendedproperty 'MS_Description', 
   '主要危害',
   'user', 'dbo', 'table', 'Eaer_Accident', 'column', 'Harm'
go

execute sp_addextendedproperty 'MS_Description', 
   '是否结束',
   'user', 'dbo', 'table', 'Eaer_Accident', 'column', 'IsOver'
go

execute sp_addextendedproperty 'MS_Description', 
   '对现场命令指示',
   'user', 'dbo', 'table', 'Eaer_Accident', 'column', 'SceneOpinion'
go

execute sp_addextendedproperty 'MS_Description', 
   '现场反馈信息',
   'user', 'dbo', 'table', 'Eaer_Accident', 'column', 'CenterOpinion'
go

execute sp_addextendedproperty 'MS_Description', 
   '上级命令指示',
   'user', 'dbo', 'table', 'Eaer_Accident', 'column', 'DepartmentOpinion'
go

execute sp_addextendedproperty 'MS_Description', 
   '对上级部门反馈信息',
   'user', 'dbo', 'table', 'Eaer_Accident', 'column', 'SuperiorOpinion'
go

execute sp_addextendedproperty 'MS_Description', 
   '现场视频',
   'user', 'dbo', 'table', 'Eaer_Accident', 'column', 'Vidio'
go

execute sp_addextendedproperty 'MS_Description', 
   '处置方法',
   'user', 'dbo', 'table', 'Eaer_Accident', 'column', 'Scheme'
go

/*==============================================================*/
/* Table: Eaer_AccidentExperts                                  */
/*==============================================================*/
create table dbo.Eaer_AccidentExperts (
   AccidentID           Int                  not null,
   ExpertID             Int                  not null,
   MainWork             text                 null,
   Comment              varchar(200)         null,
   constraint PK_EAER_ACCIDENTEXPERTS primary key (AccidentID, ExpertID)
)
go

execute sp_addextendedproperty 'MS_Description', 
   '应急事故处理专家',
   'user', 'dbo', 'table', 'Eaer_AccidentExperts'
go

execute sp_addextendedproperty 'MS_Description', 
   '事故编码',
   'user', 'dbo', 'table', 'Eaer_AccidentExperts', 'column', 'AccidentID'
go

execute sp_addextendedproperty 'MS_Description', 
   '专家编码',
   'user', 'dbo', 'table', 'Eaer_AccidentExperts', 'column', 'ExpertID'
go

execute sp_addextendedproperty 'MS_Description', 
   '工作描述',
   'user', 'dbo', 'table', 'Eaer_AccidentExperts', 'column', 'MainWork'
go

execute sp_addextendedproperty 'MS_Description', 
   '备注',
   'user', 'dbo', 'table', 'Eaer_AccidentExperts', 'column', 'Comment'
go

/*==============================================================*/
/* Table: Eaer_AccidentMaterial                                 */
/*==============================================================*/
create table dbo.Eaer_AccidentMaterial (
   AccidentID           Int                  not null,
   MaterialID           Int                  not null,
   MaterialAmount       Numeric(10,2)        null,
   Unit                 varchar(50)          null,
   Comment              varchar(200)         null,
   constraint PK_EAER_ACCIDENTMATERIAL primary key (AccidentID, MaterialID)
)
go

execute sp_addextendedproperty 'MS_Description', 
   '事故应急物资',
   'user', 'dbo', 'table', 'Eaer_AccidentMaterial'
go

execute sp_addextendedproperty 'MS_Description', 
   '事故编码',
   'user', 'dbo', 'table', 'Eaer_AccidentMaterial', 'column', 'AccidentID'
go

execute sp_addextendedproperty 'MS_Description', 
   '物资编码',
   'user', 'dbo', 'table', 'Eaer_AccidentMaterial', 'column', 'MaterialID'
go

execute sp_addextendedproperty 'MS_Description', 
   '使用数量',
   'user', 'dbo', 'table', 'Eaer_AccidentMaterial', 'column', 'MaterialAmount'
go

execute sp_addextendedproperty 'MS_Description', 
   '计量单位',
   'user', 'dbo', 'table', 'Eaer_AccidentMaterial', 'column', 'Unit'
go

execute sp_addextendedproperty 'MS_Description', 
   '备注',
   'user', 'dbo', 'table', 'Eaer_AccidentMaterial', 'column', 'Comment'
go

/*==============================================================*/
/* Table: Eaer_AccidentMedias                                   */
/*==============================================================*/
create table dbo.Eaer_AccidentMedias (
   AccidentID           Int                  not null,
   MediaShowName        Varchar(50)          null,
   RealPath             varchar(50)          null,
   Content              Varchar(500)         null,
   FileType             varchar(10)          null,
   UploadDate           DateTime             null,
   Comment              Varchar(500)         null,
   constraint PK_EAER_ACCIDENTMEDIAS primary key (AccidentID)
)
go

execute sp_addextendedproperty 'MS_Description', 
   '事故录像信息',
   'user', 'dbo', 'table', 'Eaer_AccidentMedias'
go

execute sp_addextendedproperty 'MS_Description', 
   '事故编码',
   'user', 'dbo', 'table', 'Eaer_AccidentMedias', 'column', 'AccidentID'
go

execute sp_addextendedproperty 'MS_Description', 
   '录像显示名称',
   'user', 'dbo', 'table', 'Eaer_AccidentMedias', 'column', 'MediaShowName'
go

execute sp_addextendedproperty 'MS_Description', 
   '录像实际路径、名称',
   'user', 'dbo', 'table', 'Eaer_AccidentMedias', 'column', 'RealPath'
go

execute sp_addextendedproperty 'MS_Description', 
   '录像说明',
   'user', 'dbo', 'table', 'Eaer_AccidentMedias', 'column', 'Content'
go

execute sp_addextendedproperty 'MS_Description', 
   '录像文件后缀',
   'user', 'dbo', 'table', 'Eaer_AccidentMedias', 'column', 'FileType'
go

execute sp_addextendedproperty 'MS_Description', 
   '文件上传时间',
   'user', 'dbo', 'table', 'Eaer_AccidentMedias', 'column', 'UploadDate'
go

execute sp_addextendedproperty 'MS_Description', 
   '备注',
   'user', 'dbo', 'table', 'Eaer_AccidentMedias', 'column', 'Comment'
go

/*==============================================================*/
/* Table: Eaer_AccidentPictures                                 */
/*==============================================================*/
create table dbo.Eaer_AccidentPictures (
   AccidentID           Int                  null,
   PicShowName          Varchar(50)          null,
   RealPath             varchar(50)          null,
   Content              Varchar(500)         null,
   FileType             varchar(50)          null,
   UploadDate           DateTime             null,
   Comment              Varchar(500)         null
)
go

execute sp_addextendedproperty 'MS_Description', 
   '事故图片信息表',
   'user', 'dbo', 'table', 'Eaer_AccidentPictures'
go

execute sp_addextendedproperty 'MS_Description', 
   '事故编码',
   'user', 'dbo', 'table', 'Eaer_AccidentPictures', 'column', 'AccidentID'
go

execute sp_addextendedproperty 'MS_Description', 
   '图片显示名称',
   'user', 'dbo', 'table', 'Eaer_AccidentPictures', 'column', 'PicShowName'
go

execute sp_addextendedproperty 'MS_Description', 
   '图片实际路径、名称',
   'user', 'dbo', 'table', 'Eaer_AccidentPictures', 'column', 'RealPath'
go

execute sp_addextendedproperty 'MS_Description', 
   '图片说明',
   'user', 'dbo', 'table', 'Eaer_AccidentPictures', 'column', 'Content'
go

execute sp_addextendedproperty 'MS_Description', 
   '图片文件后缀',
   'user', 'dbo', 'table', 'Eaer_AccidentPictures', 'column', 'FileType'
go

execute sp_addextendedproperty 'MS_Description', 
   '文件上传时间',
   'user', 'dbo', 'table', 'Eaer_AccidentPictures', 'column', 'UploadDate'
go

execute sp_addextendedproperty 'MS_Description', 
   '备注',
   'user', 'dbo', 'table', 'Eaer_AccidentPictures', 'column', 'Comment'
go

/*==============================================================*/
/* Table: Eaer_AccidentSolution                                 */
/*==============================================================*/
create table dbo.Eaer_AccidentSolution (
   AccidentID           Int                  not null,
   SolutionID           Int                  not null,
   MediaShowName        Varchar(50)          null,
   RealPath             varchar(50)          null,
   FileType             varchar(10)          null,
   UploadDate           DateTime             null,
   Comment              Varchar(500)         null,
   constraint PK_EAER_ACCIDENTSOLUTION primary key (AccidentID, SolutionID)
)
go

execute sp_addextendedproperty 'MS_Description', 
   '事故处理方案',
   'user', 'dbo', 'table', 'Eaer_AccidentSolution'
go

execute sp_addextendedproperty 'MS_Description', 
   '事故编码',
   'user', 'dbo', 'table', 'Eaer_AccidentSolution', 'column', 'AccidentID'
go

execute sp_addextendedproperty 'MS_Description', 
   '方案编码',
   'user', 'dbo', 'table', 'Eaer_AccidentSolution', 'column', 'SolutionID'
go

execute sp_addextendedproperty 'MS_Description', 
   '标题',
   'user', 'dbo', 'table', 'Eaer_AccidentSolution', 'column', 'MediaShowName'
go

execute sp_addextendedproperty 'MS_Description', 
   '实际路径、名称',
   'user', 'dbo', 'table', 'Eaer_AccidentSolution', 'column', 'RealPath'
go

execute sp_addextendedproperty 'MS_Description', 
   '文件后缀',
   'user', 'dbo', 'table', 'Eaer_AccidentSolution', 'column', 'FileType'
go

execute sp_addextendedproperty 'MS_Description', 
   '文件上传时间',
   'user', 'dbo', 'table', 'Eaer_AccidentSolution', 'column', 'UploadDate'
go

execute sp_addextendedproperty 'MS_Description', 
   '备注',
   'user', 'dbo', 'table', 'Eaer_AccidentSolution', 'column', 'Comment'
go

/*==============================================================*/
/* Table: Eaer_CaseLibrary                                      */
/*==============================================================*/
create table Eaer_CaseLibrary (
   CaseID               int                  not null,
   CaseName             Varchar(50)          null,
   CityCode             Varchar(50)          null,
   OccurrenceTime       Datetime             null,
   CaseType             Varchar(50)          null,
   Description          Text                 null,
   constraint PK_EAER_CASELIBRARY primary key (CaseID)
)
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '事故案例',
   'user', @CurrentUser, 'table', 'Eaer_CaseLibrary'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '案例编码',
   'user', @CurrentUser, 'table', 'Eaer_CaseLibrary', 'column', 'CaseID'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '案例名称',
   'user', @CurrentUser, 'table', 'Eaer_CaseLibrary', 'column', 'CaseName'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '所在城市',
   'user', @CurrentUser, 'table', 'Eaer_CaseLibrary', 'column', 'CityCode'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '发生时间',
   'user', @CurrentUser, 'table', 'Eaer_CaseLibrary', 'column', 'OccurrenceTime'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '类别',
   'user', @CurrentUser, 'table', 'Eaer_CaseLibrary', 'column', 'CaseType'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '案例描述',
   'user', @CurrentUser, 'table', 'Eaer_CaseLibrary', 'column', 'Description'
go

/*==============================================================*/
/* Table: Eaer_EmergencyDept                                    */
/*==============================================================*/
create table dbo.Eaer_EmergencyDept (
   DeptID               Int                  not null,
   StateCode            varchar(40)          null,
   DeptName             varchar(100)         null,
   Principal            varchar(20)          null,
   Duty                 varchar(40)          null,
   LinkTel              varchar(30)          null,
   Mobile               varchar(20)          null,
   DutyPhone            varchar(20)          null,
   constraint PK_EAER_EMERGENCYDEPT primary key (DeptID)
)
go

execute sp_addextendedproperty 'MS_Description', 
   '全国应急救援机构',
   'user', 'dbo', 'table', 'Eaer_EmergencyDept'
go

execute sp_addextendedproperty 'MS_Description', 
   '机构编码',
   'user', 'dbo', 'table', 'Eaer_EmergencyDept', 'column', 'DeptID'
go

execute sp_addextendedproperty 'MS_Description', 
   '所在城市',
   'user', 'dbo', 'table', 'Eaer_EmergencyDept', 'column', 'StateCode'
go

execute sp_addextendedproperty 'MS_Description', 
   '机关名称',
   'user', 'dbo', 'table', 'Eaer_EmergencyDept', 'column', 'DeptName'
go

execute sp_addextendedproperty 'MS_Description', 
   '负责人',
   'user', 'dbo', 'table', 'Eaer_EmergencyDept', 'column', 'Principal'
go

execute sp_addextendedproperty 'MS_Description', 
   '职务',
   'user', 'dbo', 'table', 'Eaer_EmergencyDept', 'column', 'Duty'
go

execute sp_addextendedproperty 'MS_Description', 
   '联系电话',
   'user', 'dbo', 'table', 'Eaer_EmergencyDept', 'column', 'LinkTel'
go

execute sp_addextendedproperty 'MS_Description', 
   '手机',
   'user', 'dbo', 'table', 'Eaer_EmergencyDept', 'column', 'Mobile'
go

execute sp_addextendedproperty 'MS_Description', 
   '值班电话',
   'user', 'dbo', 'table', 'Eaer_EmergencyDept', 'column', 'DutyPhone'
go

/*==============================================================*/
/* Table: Eaer_Experts                                          */
/*==============================================================*/
create table Eaer_Experts (
   ExpertID             int                  not null,
   StateID              Varchar(20)          null,
   CityCode             Varchar(20)          null,
   ExpertName           varchar(20)          null,
   Sex                  Bit                  null,
   Birthday             Varchar(20)          null,
   Folk                 Varchar(20)          null,
   Specialty            Varchar(50)          null,
   Degree               Varchar(50)          null,
   Duty                 Varchar(50)          null,
   Company              Varchar(200)         null,
   CompanyTel           Varchar(100)         null,
   CompanyAdd           Varchar(50)          null,
   MobilPhone           Varchar(20)          null,
   Telephone            Varchar(30)          null,
   Postal               Varchar(10)          null,
   Specialties          Varchar(500)         null,
   Email                Varchar(80)          null,
   WebPage              Varchar(80)          null,
   SpellCode            Varchar(50)          null,
   Image                Varchar(20)          null,
   constraint PK_EAER_EXPERTS primary key (ExpertID)
)
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '应急专家',
   'user', @CurrentUser, 'table', 'Eaer_Experts'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '专家编码',
   'user', @CurrentUser, 'table', 'Eaer_Experts', 'column', 'ExpertID'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '省份代码',
   'user', @CurrentUser, 'table', 'Eaer_Experts', 'column', 'StateID'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '城市代码',
   'user', @CurrentUser, 'table', 'Eaer_Experts', 'column', 'CityCode'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '专家姓名',
   'user', @CurrentUser, 'table', 'Eaer_Experts', 'column', 'ExpertName'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '性别',
   'user', @CurrentUser, 'table', 'Eaer_Experts', 'column', 'Sex'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '出生年月',
   'user', @CurrentUser, 'table', 'Eaer_Experts', 'column', 'Birthday'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '民族',
   'user', @CurrentUser, 'table', 'Eaer_Experts', 'column', 'Folk'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '专业',
   'user', @CurrentUser, 'table', 'Eaer_Experts', 'column', 'Specialty'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '学历学位',
   'user', @CurrentUser, 'table', 'Eaer_Experts', 'column', 'Degree'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '专业职称',
   'user', @CurrentUser, 'table', 'Eaer_Experts', 'column', 'Duty'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '工作单位',
   'user', @CurrentUser, 'table', 'Eaer_Experts', 'column', 'Company'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '单位电话',
   'user', @CurrentUser, 'table', 'Eaer_Experts', 'column', 'CompanyTel'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '单位地址',
   'user', @CurrentUser, 'table', 'Eaer_Experts', 'column', 'CompanyAdd'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '移动电话',
   'user', @CurrentUser, 'table', 'Eaer_Experts', 'column', 'MobilPhone'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '家庭电话',
   'user', @CurrentUser, 'table', 'Eaer_Experts', 'column', 'Telephone'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '邮政编码',
   'user', @CurrentUser, 'table', 'Eaer_Experts', 'column', 'Postal'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '主要特长',
   'user', @CurrentUser, 'table', 'Eaer_Experts', 'column', 'Specialties'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   'Email地址',
   'user', @CurrentUser, 'table', 'Eaer_Experts', 'column', 'Email'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '主页链接',
   'user', @CurrentUser, 'table', 'Eaer_Experts', 'column', 'WebPage'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '拼音首字母检索标识',
   'user', @CurrentUser, 'table', 'Eaer_Experts', 'column', 'SpellCode'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '头像',
   'user', @CurrentUser, 'table', 'Eaer_Experts', 'column', 'Image'
go

/*==============================================================*/
/* Table: Eaer_Item                                             */
/*==============================================================*/
create table Eaer_Item (
   AccidentID           Int                  not null,
   ItemID               Int                  not null,
   ItemAmount           varchar(50)          null,
   Units                Varchar(50)          null,
   MonitorUnits         Varchar(50)          null,
   constraint PK_EAER_ITEM primary key (AccidentID, ItemID)
)
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '事故危险品',
   'user', @CurrentUser, 'table', 'Eaer_Item'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '危险品编码',
   'user', @CurrentUser, 'table', 'Eaer_Item', 'column', 'AccidentID'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '危险品编码',
   'user', @CurrentUser, 'table', 'Eaer_Item', 'column', 'ItemID'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '危险品数量',
   'user', @CurrentUser, 'table', 'Eaer_Item', 'column', 'ItemAmount'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '数量单位',
   'user', @CurrentUser, 'table', 'Eaer_Item', 'column', 'Units'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '危险品监测单位',
   'user', @CurrentUser, 'table', 'Eaer_Item', 'column', 'MonitorUnits'
go

/*==============================================================*/
/* Table: Eaer_Knowledge                                        */
/*==============================================================*/
create table Eaer_Knowledge (
   KnowledgeID          int                  not null,
   Knowledge            Varchar(150)         null,
   PublishDept          Varchar(200)         null,
   ReleaseDate          Varchar(20)          null,
   ImplDate             Varchar(20)          null,
   Contents             text                 null,
   Type                 Varchar(50)          null,
   EmergencyType        Varchar(50)          null,
   constraint PK_EAER_KNOWLEDGE primary key (KnowledgeID)
)
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '法律法规知识库',
   'user', @CurrentUser, 'table', 'Eaer_Knowledge'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '知识编码',
   'user', @CurrentUser, 'table', 'Eaer_Knowledge', 'column', 'KnowledgeID'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '名称',
   'user', @CurrentUser, 'table', 'Eaer_Knowledge', 'column', 'Knowledge'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '发布单位',
   'user', @CurrentUser, 'table', 'Eaer_Knowledge', 'column', 'PublishDept'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '发布时间',
   'user', @CurrentUser, 'table', 'Eaer_Knowledge', 'column', 'ReleaseDate'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '实施时间',
   'user', @CurrentUser, 'table', 'Eaer_Knowledge', 'column', 'ImplDate'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '内容',
   'user', @CurrentUser, 'table', 'Eaer_Knowledge', 'column', 'Contents'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '类别',
   'user', @CurrentUser, 'table', 'Eaer_Knowledge', 'column', 'Type'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '应急类别',
   'user', @CurrentUser, 'table', 'Eaer_Knowledge', 'column', 'EmergencyType'
go

/*==============================================================*/
/* Table: Eaer_Materials                                        */
/*==============================================================*/
create table Eaer_Materials (
   MaterialsID          int                  not null,
   MaterialsName        Varchar(100)         null,
   Repository           Varchar(200)         null,
   Department           Varchar(200)         null,
   PrincipalName        Varchar(50)          null,
   LinkTel              Varchar(20)          null,
   EmergencyType        Varchar(50)          null,
   Type                 Varchar(50)          null,
   Quantity             Varchar(10)          null,
   MeasureUnit          Varchar(10)          null,
   Longitude            Numeric(8,4)         null,
   Latitude             Numeric(8,4)         null,
   Useage               Varchar(1000)        null,
   Remark               Varchar(200)         null,
   constraint PK_EAER_MATERIALS primary key (MaterialsID)
)
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '应急物资',
   'user', @CurrentUser, 'table', 'Eaer_Materials'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '物资编码',
   'user', @CurrentUser, 'table', 'Eaer_Materials', 'column', 'MaterialsID'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '物资名称',
   'user', @CurrentUser, 'table', 'Eaer_Materials', 'column', 'MaterialsName'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '所在储备库',
   'user', @CurrentUser, 'table', 'Eaer_Materials', 'column', 'Repository'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '主管单位',
   'user', @CurrentUser, 'table', 'Eaer_Materials', 'column', 'Department'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '主管单位负责人',
   'user', @CurrentUser, 'table', 'Eaer_Materials', 'column', 'PrincipalName'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '联系电话',
   'user', @CurrentUser, 'table', 'Eaer_Materials', 'column', 'LinkTel'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '应急类别',
   'user', @CurrentUser, 'table', 'Eaer_Materials', 'column', 'EmergencyType'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '物资类别',
   'user', @CurrentUser, 'table', 'Eaer_Materials', 'column', 'Type'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '数量',
   'user', @CurrentUser, 'table', 'Eaer_Materials', 'column', 'Quantity'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '计量单位',
   'user', @CurrentUser, 'table', 'Eaer_Materials', 'column', 'MeasureUnit'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '经度',
   'user', @CurrentUser, 'table', 'Eaer_Materials', 'column', 'Longitude'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '纬度',
   'user', @CurrentUser, 'table', 'Eaer_Materials', 'column', 'Latitude'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '用途',
   'user', @CurrentUser, 'table', 'Eaer_Materials', 'column', 'Useage'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '备注',
   'user', @CurrentUser, 'table', 'Eaer_Materials', 'column', 'Remark'
go

/*==============================================================*/
/* Table: Eaer_Plan                                             */
/*==============================================================*/
create table dbo.Eaer_Plan (
   PlanID               Int                  not null,
   EnterpriseID         Varchar(20)          null,
   PlanName             Varchar(200)         null,
   PlanType             Varchar(10)          null,
   AuditPerson          Varchar(50)          null,
   AuditDate            Datetime             null,
   AuditOpinion         Text                 null,
   BackupPerson         Varchar(50)          null,
   BackupDate           Datetime             null,
   Duration             Varchar(10)          null,
   Version              Varchar(20)          null,
   Field                Varchar(100)         null,
   Scope                Varchar(10)          null,
   PublishDept          Varchar(50)          null,
   PublishNo            Varchar(30)          null,
   PublishDate          Datetime             null,
   Promulgator          Varchar(50)          null,
   Summary              Varchar(300)         null,
   SavePath             Varchar(100)         null,
   GeneralRules         Text                 null,
   RiskAnalysis         Text                 null,
   Responsibility       Text                 null,
   Prevent              Text                 null,
   Response             Text                 null,
   Release              Text                 null,
   Treatment            Text                 null,
   Ensure               Text                 null,
   Training             Text                 null,
   RewardPunishment     Text                 null,
   Supplementary        Text                 null,
   Attachment           varchar(100)         null,
   Features             Text                 null,
   Attentions           Text                 null,
   Remark               Text                 null,
   constraint PK_EAER_PLAN primary key (PlanID)
)
go

execute sp_addextendedproperty 'MS_Description', 
   '应急预案',
   'user', 'dbo', 'table', 'Eaer_Plan'
go

execute sp_addextendedproperty 'MS_Description', 
   '预案编码',
   'user', 'dbo', 'table', 'Eaer_Plan', 'column', 'PlanID'
go

execute sp_addextendedproperty 'MS_Description', 
   '所属单位编码',
   'user', 'dbo', 'table', 'Eaer_Plan', 'column', 'EnterpriseID'
go

execute sp_addextendedproperty 'MS_Description', 
   '预案名称',
   'user', 'dbo', 'table', 'Eaer_Plan', 'column', 'PlanName'
go

execute sp_addextendedproperty 'MS_Description', 
   '预案类别',
   'user', 'dbo', 'table', 'Eaer_Plan', 'column', 'PlanType'
go

execute sp_addextendedproperty 'MS_Description', 
   '审核人',
   'user', 'dbo', 'table', 'Eaer_Plan', 'column', 'AuditPerson'
go

execute sp_addextendedproperty 'MS_Description', 
   '审核日期',
   'user', 'dbo', 'table', 'Eaer_Plan', 'column', 'AuditDate'
go

execute sp_addextendedproperty 'MS_Description', 
   '审核意见',
   'user', 'dbo', 'table', 'Eaer_Plan', 'column', 'AuditOpinion'
go

execute sp_addextendedproperty 'MS_Description', 
   '备案审批人',
   'user', 'dbo', 'table', 'Eaer_Plan', 'column', 'BackupPerson'
go

execute sp_addextendedproperty 'MS_Description', 
   '备案生效日期',
   'user', 'dbo', 'table', 'Eaer_Plan', 'column', 'BackupDate'
go

execute sp_addextendedproperty 'MS_Description', 
   '备案期限',
   'user', 'dbo', 'table', 'Eaer_Plan', 'column', 'Duration'
go

execute sp_addextendedproperty 'MS_Description', 
   '版本号',
   'user', 'dbo', 'table', 'Eaer_Plan', 'column', 'Version'
go

execute sp_addextendedproperty 'MS_Description', 
   '适用领域',
   'user', 'dbo', 'table', 'Eaer_Plan', 'column', 'Field'
go

execute sp_addextendedproperty 'MS_Description', 
   '适用范围',
   'user', 'dbo', 'table', 'Eaer_Plan', 'column', 'Scope'
go

execute sp_addextendedproperty 'MS_Description', 
   '发布部门/单位',
   'user', 'dbo', 'table', 'Eaer_Plan', 'column', 'PublishDept'
go

execute sp_addextendedproperty 'MS_Description', 
   '发布文号',
   'user', 'dbo', 'table', 'Eaer_Plan', 'column', 'PublishNo'
go

execute sp_addextendedproperty 'MS_Description', 
   '发布日期',
   'user', 'dbo', 'table', 'Eaer_Plan', 'column', 'PublishDate'
go

execute sp_addextendedproperty 'MS_Description', 
   '签发人',
   'user', 'dbo', 'table', 'Eaer_Plan', 'column', 'Promulgator'
go

execute sp_addextendedproperty 'MS_Description', 
   '预案摘要',
   'user', 'dbo', 'table', 'Eaer_Plan', 'column', 'Summary'
go

execute sp_addextendedproperty 'MS_Description', 
   '预案保存路径',
   'user', 'dbo', 'table', 'Eaer_Plan', 'column', 'SavePath'
go

execute sp_addextendedproperty 'MS_Description', 
   '总则',
   'user', 'dbo', 'table', 'Eaer_Plan', 'column', 'GeneralRules'
go

execute sp_addextendedproperty 'MS_Description', 
   '危险性分析',
   'user', 'dbo', 'table', 'Eaer_Plan', 'column', 'RiskAnalysis'
go

execute sp_addextendedproperty 'MS_Description', 
   '组织机构及职责',
   'user', 'dbo', 'table', 'Eaer_Plan', 'column', 'Responsibility'
go

execute sp_addextendedproperty 'MS_Description', 
   '预防与预警',
   'user', 'dbo', 'table', 'Eaer_Plan', 'column', 'Prevent'
go

execute sp_addextendedproperty 'MS_Description', 
   '应急响应',
   'user', 'dbo', 'table', 'Eaer_Plan', 'column', 'Response'
go

execute sp_addextendedproperty 'MS_Description', 
   '信息发布',
   'user', 'dbo', 'table', 'Eaer_Plan', 'column', 'Release'
go

execute sp_addextendedproperty 'MS_Description', 
   '后期处置',
   'user', 'dbo', 'table', 'Eaer_Plan', 'column', 'Treatment'
go

execute sp_addextendedproperty 'MS_Description', 
   '保障措施',
   'user', 'dbo', 'table', 'Eaer_Plan', 'column', 'Ensure'
go

execute sp_addextendedproperty 'MS_Description', 
   '培训与演练',
   'user', 'dbo', 'table', 'Eaer_Plan', 'column', 'Training'
go

execute sp_addextendedproperty 'MS_Description', 
   '奖惩',
   'user', 'dbo', 'table', 'Eaer_Plan', 'column', 'RewardPunishment'
go

execute sp_addextendedproperty 'MS_Description', 
   '附则',
   'user', 'dbo', 'table', 'Eaer_Plan', 'column', 'Supplementary'
go

execute sp_addextendedproperty 'MS_Description', 
   '附件',
   'user', 'dbo', 'table', 'Eaer_Plan', 'column', 'Attachment'
go

execute sp_addextendedproperty 'MS_Description', 
   '事故特征',
   'user', 'dbo', 'table', 'Eaer_Plan', 'column', 'Features'
go

execute sp_addextendedproperty 'MS_Description', 
   '注意事项',
   'user', 'dbo', 'table', 'Eaer_Plan', 'column', 'Attentions'
go

execute sp_addextendedproperty 'MS_Description', 
   '备注',
   'user', 'dbo', 'table', 'Eaer_Plan', 'column', 'Remark'
go

/*==============================================================*/
/* Table: Eaer_RescueTeam                                       */
/*==============================================================*/
create table Eaer_RescueTeam (
   RescueID             int                  not null,
   RescueName           Varchar(100)         null,
   Duties               Varchar(500)         null,
   Scale                Varchar(20)          null,
   MainDept             Varchar(100)         null,
   Address              Varchar(100)         null,
   PrincipalName        Varchar(20)          null,
   MobilePhone          Varchar(20)          null,
   FixedPhone           Varchar(20)          null,
   Fax                  Varchar(20)          null,
   Longitude            Numeric(8,4)         null,
   Latitude             Numeric(8,4)         null,
   Trainning            Varchar(200)         null,
   EmergencyType        Varchar(50)          null,
   Remark               Varchar(200)         null,
   constraint PK_EAER_RESCUETEAM primary key (RescueID)
)
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '应急救援队伍信息',
   'user', @CurrentUser, 'table', 'Eaer_RescueTeam'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '应急队编码',
   'user', @CurrentUser, 'table', 'Eaer_RescueTeam', 'column', 'RescueID'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '应急队名称',
   'user', @CurrentUser, 'table', 'Eaer_RescueTeam', 'column', 'RescueName'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '主要职责',
   'user', @CurrentUser, 'table', 'Eaer_RescueTeam', 'column', 'Duties'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '规模',
   'user', @CurrentUser, 'table', 'Eaer_RescueTeam', 'column', 'Scale'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '主管部门',
   'user', @CurrentUser, 'table', 'Eaer_RescueTeam', 'column', 'MainDept'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '部署地点',
   'user', @CurrentUser, 'table', 'Eaer_RescueTeam', 'column', 'Address'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '负责人',
   'user', @CurrentUser, 'table', 'Eaer_RescueTeam', 'column', 'PrincipalName'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '联系电话',
   'user', @CurrentUser, 'table', 'Eaer_RescueTeam', 'column', 'MobilePhone'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '固定电话',
   'user', @CurrentUser, 'table', 'Eaer_RescueTeam', 'column', 'FixedPhone'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '传真',
   'user', @CurrentUser, 'table', 'Eaer_RescueTeam', 'column', 'Fax'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '经度',
   'user', @CurrentUser, 'table', 'Eaer_RescueTeam', 'column', 'Longitude'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '纬度',
   'user', @CurrentUser, 'table', 'Eaer_RescueTeam', 'column', 'Latitude'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '培训演练情况',
   'user', @CurrentUser, 'table', 'Eaer_RescueTeam', 'column', 'Trainning'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '应急类别',
   'user', @CurrentUser, 'table', 'Eaer_RescueTeam', 'column', 'EmergencyType'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '备注',
   'user', @CurrentUser, 'table', 'Eaer_RescueTeam', 'column', 'Remark'
go

/*==============================================================*/
/* Table: Eaer_Suggestion                                       */
/*==============================================================*/
create table Eaer_Suggestion (
   SuggestionID         Int                  not null,
   AccidentID           Int                  null,
   Showname             Varchar(50)          null,
   RealPath             Varchar(50)          null,
   FileType             Varchar(50)          null,
   Comment              Varchar(500)         null,
   UploadDate           Datetime             null,
   constraint PK_EAER_SUGGESTION primary key (SuggestionID)
)
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '专家处理意见',
   'user', @CurrentUser, 'table', 'Eaer_Suggestion'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '方案编码',
   'user', @CurrentUser, 'table', 'Eaer_Suggestion', 'column', 'SuggestionID'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '事故编码',
   'user', @CurrentUser, 'table', 'Eaer_Suggestion', 'column', 'AccidentID'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '标题',
   'user', @CurrentUser, 'table', 'Eaer_Suggestion', 'column', 'Showname'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '文件实际路径、名称',
   'user', @CurrentUser, 'table', 'Eaer_Suggestion', 'column', 'RealPath'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '图片文件后缀',
   'user', @CurrentUser, 'table', 'Eaer_Suggestion', 'column', 'FileType'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '备注',
   'user', @CurrentUser, 'table', 'Eaer_Suggestion', 'column', 'Comment'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '文件上传时间',
   'user', @CurrentUser, 'table', 'Eaer_Suggestion', 'column', 'UploadDate'
go

/*==============================================================*/
/* Table: Eaer_Suppliers                                        */
/*==============================================================*/
create table Eaer_Suppliers (
   SuppliersID          int                  not null,
   Suppliers            Varchar(200)         null,
   SuppliersType        Varchar(50)          null,
   SuppAddress          Varchar(200)         null,
   Contact              Varchar(20)          null,
   Telephone            Varchar(20)          null,
   MobileTel            Varchar(20)          null,
   Fax                  Varchar(20)          null,
   Materials            Varchar(100)         null,
   Remark               Varchar(200)         null,
   constraint PK_EAER_SUPPLIERS primary key (SuppliersID)
)
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '物资供应商信息',
   'user', @CurrentUser, 'table', 'Eaer_Suppliers'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '供应商编码',
   'user', @CurrentUser, 'table', 'Eaer_Suppliers', 'column', 'SuppliersID'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '供应商名称',
   'user', @CurrentUser, 'table', 'Eaer_Suppliers', 'column', 'Suppliers'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '供应物资类别',
   'user', @CurrentUser, 'table', 'Eaer_Suppliers', 'column', 'SuppliersType'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '供应商地址',
   'user', @CurrentUser, 'table', 'Eaer_Suppliers', 'column', 'SuppAddress'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '联系人',
   'user', @CurrentUser, 'table', 'Eaer_Suppliers', 'column', 'Contact'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '联系电话',
   'user', @CurrentUser, 'table', 'Eaer_Suppliers', 'column', 'Telephone'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '手机',
   'user', @CurrentUser, 'table', 'Eaer_Suppliers', 'column', 'MobileTel'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '传真',
   'user', @CurrentUser, 'table', 'Eaer_Suppliers', 'column', 'Fax'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '物资名称',
   'user', @CurrentUser, 'table', 'Eaer_Suppliers', 'column', 'Materials'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '备注',
   'user', @CurrentUser, 'table', 'Eaer_Suppliers', 'column', 'Remark'
go

/*==============================================================*/
/* Table: Eaer_TrafficHealth                                    */
/*==============================================================*/
create table Eaer_TrafficHealth (
   TraID                int                  not null,
   DeptName             Varchar(100)         null,
   DeptAddress          Varchar(100)         null,
   PrincipalName        Varchar(20)          null,
   MobilePhone          Varchar(50)          null,
   FixedPhone           Varchar(50)          null,
   OfficePhone          Varchar(50)          null,
   Region               Varchar(50)          null,
   Type                 Varchar(2)           null,
   Longitude            Numeric(8,4)         null,
   Latitude             Numeric(8,4)         null,
   Remark               Varchar(200)         null,
   constraint PK_EAER_TRAFFICHEALTH primary key (TraID)
)
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '交通运输信息(医疗卫生信息)',
   'user', @CurrentUser, 'table', 'Eaer_TrafficHealth'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '编码',
   'user', @CurrentUser, 'table', 'Eaer_TrafficHealth', 'column', 'TraID'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '单位机构名称',
   'user', @CurrentUser, 'table', 'Eaer_TrafficHealth', 'column', 'DeptName'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '单位机构地点',
   'user', @CurrentUser, 'table', 'Eaer_TrafficHealth', 'column', 'DeptAddress'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '负责人',
   'user', @CurrentUser, 'table', 'Eaer_TrafficHealth', 'column', 'PrincipalName'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '联系电话',
   'user', @CurrentUser, 'table', 'Eaer_TrafficHealth', 'column', 'MobilePhone'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '固定电话',
   'user', @CurrentUser, 'table', 'Eaer_TrafficHealth', 'column', 'FixedPhone'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '办公电话',
   'user', @CurrentUser, 'table', 'Eaer_TrafficHealth', 'column', 'OfficePhone'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '所属区县',
   'user', @CurrentUser, 'table', 'Eaer_TrafficHealth', 'column', 'Region'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '类别',
   'user', @CurrentUser, 'table', 'Eaer_TrafficHealth', 'column', 'Type'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '经度',
   'user', @CurrentUser, 'table', 'Eaer_TrafficHealth', 'column', 'Longitude'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '纬度',
   'user', @CurrentUser, 'table', 'Eaer_TrafficHealth', 'column', 'Latitude'
go

declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description', 
   '备注',
   'user', @CurrentUser, 'table', 'Eaer_TrafficHealth', 'column', 'Remark'
go

 